import React, { JSX, LazyExoticComponent } from 'react'

export const LazyImportComponent = (props: {
  lazyChildren: LazyExoticComponent<() => JSX.Element>
}) => {
  const Loading = () => <>loading</>
  return (
    <React.Suspense fallback={<Loading />}>
      <props.lazyChildren />
    </React.Suspense>
  )
}
